<template>
  <div class="about">
    <!-- <h2>About页面的数据:{{$store.getters.getNum}}</h2> -->

    <h2>About页面的数据:{{getNum}}</h2>
    <button @click="increase()">About的按钮，点击加1</button>
  </div>
</template>
<script>
import { mapGetters, mapMutations } from 'vuex'
import { MUTATIONS_TYPE } from '@/store/mutations_type.js'
export default {
  name:'About',
  computed:{
    ...mapGetters(['getNum'])
  },
  methods: {
    // 方法一
    ...mapMutations([MUTATIONS_TYPE.INCREASE]),
    
    // 方法二
    // increase(){
    //   this.$store.commit(MUTATIONS_TYPE.INCREASE)
    // }
  },
}
</script>